package com.drugStorage.spring.ServiceImpl;

import java.util.List;

import com.drugStorage.domain.DrugScience;
import com.drugStorage.hibernate.dao.DrugScienceDao;
import com.drugStorage.spring.service.DrugService;

public class DrugServiceImpl implements DrugService {

	private DrugScienceDao drugScienceDao;
	
	public DrugScienceDao getDrugScienceDao() {
		return drugScienceDao;
	}

	public void setDrugScienceDao(DrugScienceDao drugScienceDao) {
		this.drugScienceDao = drugScienceDao;
	}

	public void delDrug(DrugScience drugScience) {
		drugScienceDao.delDrug(drugScience);

	}

	public DrugScience getDrugById(int id) {
	   return  drugScienceDao.getDrugById(id);

	}

	public void saveDrug(DrugScience drugScience) {
	      drugScienceDao.saveDrug(drugScience);

	}

	public List<DrugScience> showDrugs() {
		return drugScienceDao.getDrugList();
	}

	public void updateDrug(DrugScience drugScience) {
		drugScienceDao.updateDrug(drugScience);

	}

}
